
<nz-tag
nzMode="closeable"
(nzOnClose)="onClose(node)"
[nzColor]="'blue'"
*ngFor="let node of selectedParent"
>
{{ node.label }}
</nz-tag>

<nz-tree-view class="virtual-scroll-tree" [nzTreeControl]="treeService.treeControl" [nzDataSource]="dataSource">
  <nz-tree-node *nzTreeNodeDef="let node" nzTreeNodeIndentLine>
    <nz-tree-node-option
      [nzSelected]="treeService.selectListSelection.isSelected(node)"
      (nzClick)="onItemSelect(node)"
    >
      {{ node.label }}
    </nz-tree-node-option>
  </nz-tree-node>

  <nz-tree-node *nzTreeNodeDef="let node; when: hasChild" nzTreeNodePadding>
    <nz-tree-node-toggle *ngIf="!node.loading">
      <i nz-icon nzType="caret-down" nzTreeNodeToggleRotateIcon></i>
    </nz-tree-node-toggle>
    <nz-tree-node-toggle *ngIf="node.loading" nzTreeNodeNoopToggle>
      <i nz-icon nzType="loading" nzTreeNodeToggleActiveIcon></i>
    </nz-tree-node-toggle>
    <nz-tree-node-option
      [nzSelected]="treeService.selectListSelection.isSelected(node)"
      (nzClick)="onItemSelect(node)"
    >
      {{
        node.label +
          (node.childCount > 0 ? "（" + node.childCount + "）" : "")
      }}
    </nz-tree-node-option>
  </nz-tree-node>
</nz-tree-view>
